/* GUI CONVERTED from relniq.p (converter v1.75) Sat Aug 12 23:06:01 2000 */
/* relniq.p - PRODUCTION LINE INQUIRY                                   */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/* web convert relniq.p (converter v1.00) Fri Mar 06 11:30:05 1998 */
/* web tag in relniq.p (converter v1.00) Fri Mar 06 11:29:51 1998 */
/*F0PN*/ /*K1KD*/ /*                                                    */
/*V8:ConvertMode=Report                                        */
/* REVISION: 7.0      LAST MODIFIED: 02/24/92       BY: SMM  *F230      */
/* REVISION: 7.0      LAST MODIFIED: 03/29/92       BY: emb  *F331*     */
/* REVISION: 7.0      LAST MODIFIED: 05/22/92       BY: emb  *F530*     */
/* Revision: 7.3        Last edit:   11/19/92       By: jcd  *G339*     */
/* REVISION: 7.3      LAST MODIFIED: 12/21/92       BY: emb  *G468*     */
/* REVISION: 8.6E      LAST MODIFIED: 02/23/98   BY: *L007* A. Rahane */
/*                                   08/27/94       BY: bcm  *GL62*     */
/* REVISION: 8.6E      LAST MODIFIED: 03/06/98   BY: *K1KD* Beena Mol    */
/* REVISION: 8.6E      LAST MODIFIED: 05/20/98   BY: *K1Q4* Alfred Tan   */
/* REVISION: 8.6E      LAST MODIFIED: 06/03/98   BY: *K1RW* A.Shobha     */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00 BY: *N08T* Annasaheb Rahane */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00 BY: *N0KP* myb              */


/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

/*K1KD*/ {mfdtitle.i "b+ "}

/* ********** Begin Translatable Strings Definitions ********* */

&SCOPED-DEFINE relniq_p_1 "Item"
/* MaxLen: Comment: */

&SCOPED-DEFINE relniq_p_2 "Description"
/* MaxLen: Comment: */

/* ********** End Translatable Strings Definitions ********* */

define variable line like rps_line.
define variable site like ln_site.
define variable part like lnd_part label {&relniq_p_1}.
/*F530*  define variable rate as logical label "Rate Based Only". */

/*K1KD* {mfdtitle.i "b+ "} /*G468*/ */


/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
/*GL62*/ 
 RECT-FRAME       AT ROW 1 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1 COLUMN 3 NO-LABEL VIEW-AS TEXT SIZE-PIXELS 1 BY 1
 SKIP(.1)  /*GUI*/
space(1)
  site
  line
/*F530*  rate */
with frame a side-labels width 80 NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER INITIAL "".
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:HIDDEN in frame a = yes.
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5.  /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



/* SET EXTERNAL LABELS */
setFrameLabels(frame a:handle).

/*F530*/ site = global_site.

/*K1KD*/ {wbrp01.i}

repeat:

   do on error undo, retry with frame a:

/*K1KD*/ if c-application-mode <> 'web' then
      update site line
/*F530*  rate */
      with frame a editing:

     if frame-field = "line" then do:
        /* FIND/NEXT PREVIOUS */
        {mfnp.i ln_mstr line ln_line line ln_line ln_line}
        if recno <> ? then do:
           display ln_line @ line
/*F530*        ln_site @ site */
           with frame a.
        end.
        recno = ?.
     end.
     else if frame-field = "site" then do:
        /* FIND/NEXT PREVIOUS */
        {mfnp.i si_mstr site si_site site si_site si_site}
        if recno <> ? then do:
           display si_site @ site with frame a.
        end.
        recno = ?.
     end.
     else do:
        readkey.
        apply lastkey.
     end.
      end.  /* EDITING*/

/*K1KD*/ {wbrp06.i &command = update &fields = "  site line " &frm = "a"}

/*K1KD*/ if (c-application-mode <> 'web') or
/*K1KD*/ (c-application-mode = 'web' and
/*K1KD*/ (c-web-request begins 'data')) then do:

      if site <> "" then do:
     find si_mstr no-lock where si_site = site no-error.
     if not available si_mstr then do:
        {mfmsg.i 708 3}
/*K1KD*/ if c-application-mode = 'web' then return.
         else next-prompt site.
        undo, retry.
     end.
      end.
   end.

   hide frame b.

/*K1KD*/ end.

   {mfselprt.i "terminal" 80}
/*GUI*/ RECT-FRAME:HEIGHT-PIXELS in frame a = FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.


   for each ln_mstr no-lock where ln_line >= line
   and (ln_site = site or site = "")
/*F530*   and (ln_rate_base or not rate) */
/*F530*/ by ln_site by ln_line
   with frame b:
                
/*GUI*/ {mfguichk.i } /*Replace mfrpchk*/
                     /*G339*/

      FORM /*GUI*/ 
     ln_site
     ln_line
     ln_desc      column-label {&relniq_p_2}
     ln_rate
/*F530*  ln_rate_base column-label "Rate Based" */
      with STREAM-IO /*GUI*/  frame b down width 80 no-attr-space.

      /* SET EXTERNAL LABELS */
      setFrameLabels(frame b:handle).

      display ln_line ln_site ln_desc ln_rate WITH STREAM-IO /*GUI*/ .
/*F530* ln_rate_base label "Rate Based" when ln_rate_base = no. */

   end. /* FOR EACH */

   {mfreset.i}
/*GUI*/ {mfgrptrm.i} /*Report-to-Window*/

   {mfmsg.i 8 1}

   if site > "" then global_site = site.
end. /* REPEAT */

/*K1KD*/ {wbrp04.i &frame-spec = a}
